import 'TreeItem.dart';

import 'package:json_annotation/json_annotation.dart';

part 'TreeClass.g.dart';

///  ***************************************************************************
///  知识分类
///  ***************************************************************************

@JsonSerializable()
class TreeClass {

  int id;

  String name;

  List<TreeItem> children;

  TreeClass();

  factory TreeClass.fromJson(Map<String, dynamic> json) =>
      _$TreeClassFromJson(json);

  Map<String, dynamic> toJson() => _$TreeClassToJson(this);
}